import { createApp } from 'vue'
import App from './App.vue'
// 引入全局样式
import './styles/index.scss'
// 引入路由
import router from './router'
// 路由鉴权
import './router/permission'
// 引入pinia
import store from './store'
// 引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 中文 
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// 引入暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
// 引入icon图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app = createApp(App)
// 注册路由
app.use(router)
app.use(store)
app.use(ElementPlus, {
    locale: zhCn,
})
// 所有图标并进行全局注册
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.mount('#app')
